package sk.tuke.constraintbuilder.builder.resourcemodel;

/**
 * Created by IntelliJ IDEA.
 * User: Brano
 * Date: 16.4.2011
 * Time: 18:45
 */

public class AnnotationElement extends Element {
    private String name;
    private int line;
    private int startChar;
    private int endChar;

    public AnnotationElement(String name, int line, int charStart, int charEnd) {
        this.name = name;
        this.line = line;
        this.startChar = charStart;
        this.endChar = charEnd;
    }

    @Override
    public String generateXML() {
        return "<annotation"
                  + addXMLAttr("name", name)
                  + addXMLAttr("line", "" + line)
                  + addXMLAttr("startChar", "" + startChar)
                  + addXMLAttr("endChar", "" + endChar)
                  + "/>";
    }
}
